﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SteamFluentAPI.Infrastructure.Base;

namespace SteamFluentAPI.Infrastructure
{
    public class SteamEconomy : SteamInterface
    {
        /// <summary>
        /// Asset metadata.
        /// </summary>
        [SteamMethod("v0001")]
        public GetAssetClassInfo GetAssetClassInfo { get { return new GetAssetClassInfo(); } }
        /// <summary>
        /// Prices of items in the economy.
        /// </summary>
        [SteamMethod("v0001")]
        public GetAssetPrices GetAssetPrices { get { return new GetAssetPrices(); } }
    }

    public class GetAssetClassInfo : SteamAppMethod
    {
        /// <summary>
        /// The number of classids passed to the request. (REQUIRED)
        /// </summary>
        /// <param name="class_count"></param>
        [RequiredParameter("class_count")]
        public void ClassCount(int class_count)
        {
            Add("class_count", class_count);
        }

        /// <summary>
        /// Where classids can be a series of sequential numbers to form a list of class IDs. (REQUIRED)
        /// </summary>
        /// <param name="classids"></param>
        [RequiredParameter("classid0")]
        public void ClassIDs(params long[] classids)
        {
            for (int i = 0; i < classids.Length; i++)
            {
                Add("classid" + i, classids[i]);
            }
        }

        /// <summary>
        /// Where instanceids can be a series of sequential numbers to form a list of instanceIDs. (OPTIONAL)
        /// </summary>
        /// <param name="instanceids"></param>
        public void InstanceIDs(params long[] instanceids)
        {
            for (int i = 0; i < instanceids.Length; i++)
            {
                Add("instanceid" + i, instanceids[i]);
            }
        }
    }

    public class GetAssetPrices : SteamAppMethod
    {
        /// <summary>
        /// The ISO 4217 code for currency specific filtering. (OPTIONAL)
        /// </summary>
        /// <param name="currencyCode"></param>
        public void currency(string currencyCode)
        {
            Add("currency", currencyCode);
        }
    }
}
